<?php

namespace Modules\Manager\Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Modules\Manager\Entities\Manager;
use Spatie\Permission\Models\Role;

class ManagerTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Model::unguard();
        $data = [
          'phone'=>'11111111111',
            'password'=>Hash::make('123456')
        ];
//        $role = [
//          'name'=>'webmaster',
//          'zh_name'=>'总管理员',
//          'guard_name'=>'sanctum'
//        ];
       // Role::query()->updateOrCreate(['name'=>'webmaster'],$role);
         Manager::query()->create($data);
        //$user->syncRoles('webmaster');
        // $this->call("OthersTableSeeder");
    }
}
